
#ifndef GMSC_H
#define GMSC_H


#include <QWidget>
#include <snake.h>
#include <QTimer>
#include <block.h>
#include <QRandomGenerator>
#include <QLabel>


class gmsc : public QWidget
{
    Q_OBJECT

    Snake *snake;

    QTimer timer;
    int dtime = 300;
    bool gameStart = 0;
    bool gameend = 0;
    Block *block;
    QLabel *faillabel;

public:
    explicit gmsc(QWidget *parent = nullptr);
    void paintEvent(QPaintEvent *);
    void keyPressEvent(QKeyEvent *);
    void start();
    void stop();
    int randx(qreal minn, qreal maxx);
    int randy(qreal minn, qreal maxx);

    void end();
signals:

};

#endif // GMSC_H
